# CameraCalibration # 
if(OpenCV_FOUND AND Boost_FOUND)
	add_lcv_library(CameraCalibration)
	include_directories(${OpenCV_INCLUDE_DIRS})
	include_directories(${Boost_INCLUDE_DIRS})
	target_link_libraries(CameraCalibration ${OpenCV_LIBS} ${Boost_SYSTEM_LIBRARY} ${Boost_FILESYSTEM_LIBRARY})
else(OpenCV_FOUND AND Boost_FOUND)
	lcv_cannot_build(CameraCalibration "Libraries/Vision/CameraCalibration")
endif(OpenCV_FOUND AND Boost_FOUND)

# Fiducial # 
if(OpenCV_FOUND AND Boost_FOUND AND ZBAR_FOUND)
	add_lcv_library(Fiducial)
	include_directories(${ZBAR_INCLUDE_DIR})
	include_directories(${Boost_INCLUDE_DIRS})
	include_directories(${OpenCV_INCLUDE_DIRS})
	target_link_libraries(Fiducial ${OpenCV_LIBS} ${Boost_SYSTEM_LIBRARY} ${Boost_FILESYSTEM_LIBRARY} ${ZBAR_LIBRARIES})
	
	#Build test app main.cpp
	file(GLOB sources
		"Fiducial/src/main.cpp"
	)
	add_executable(fiducial-test-main ${sources})
	target_link_libraries(fiducial-test-main ${OpenCV_LIBS} ${Boost_SYSTEM_LIBRARY} ${Boost_FILESYSTEM_LIBRARY} ${ZBAR_LIBRARIES} Fiducial)

else(OpenCV_FOUND AND Boost_FOUND AND ZBAR_FOUND)
	lcv_cannot_build(Fiducial "Libraries/Vision/Fiducial")
endif(OpenCV_FOUND AND Boost_FOUND AND ZBAR_FOUND)
add_lcv_doc(Fiducial)

# Coordinates # 
if(OpenCV_FOUND)
	add_lcv_library(coordinates PixelCord_ReallifeCord_Transformation)
	include_directories(${OpenCV_INCLUDE_DIRS})
	target_link_libraries(coordinates ${OpenCV_LIBS})
else(OpenCV_FOUND)
	lcv_cannot_build(coordinates "Libraries/Vision/Fiducial")
endif(OpenCV_FOUND)
add_lcv_doc(coordinates)

# unicap_cv_bridge # 
if(OpenCV_FOUND AND Boost_FOUND AND UNICAP_FOUND)
	add_lcv_library(unicap_cv_bridge)
	include_directories(${UNICAP_INCLUDE_DIRS})
	include_directories(${Boost_INCLUDE_DIRS})
	include_directories(${OpenCV_INCLUDE_DIRS})
	target_link_libraries(unicap_cv_bridge ${OpenCV_LIBS} ${Boost_SYSTEM_LIBRARY} ${Boost_THREAD_LIBRARY} ${UNICAP_LIBRARIES})
else(OpenCV_FOUND AND Boost_FOUND AND UNICAP_FOUND)
	lcv_cannot_build(unicap_cv_bridge "Libraries/Vision/unicap_cv_bridge")
endif(OpenCV_FOUND AND Boost_FOUND AND UNICAP_FOUND)
add_lcv_doc(unicap_cv_bridge)

